package com.ruoyi.web.controller.activity.red;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.activity.domian.RedPacketRecord;
import com.ruoyi.activity.entity.RedPacketRecordQuery;
import com.ruoyi.activity.service.RedPacketRecordService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/activity/red/record")
public class RedPacketRecordController {
    @Resource
    private RedPacketRecordService redPacketRecordService;

    @PreAuthorize("@ss.hasPermi('activity:red:record:list')")
    @GetMapping(value = "/list")
    public Page<RedPacketRecord> list(RedPacketRecordQuery query){
        return redPacketRecordService.list(query);
    }

    @PreAuthorize("@ss.hasPermi('activity:red:record:view')")
    @GetMapping(value = "/view")
    public AjaxResult view(RedPacketRecordQuery query){
        return redPacketRecordService.view(query);
    }


}
